<template>
  <div class="a_main">
    <el-timeline>
      <el-timeline-item
        v-for="(log, index) in logs"
        :key="index"
        :timestamp="log.time"
        placement="top"
      >
        <el-card>
          <p>{{ log.nickName + ":" }}</p>
          <h4>{{ log.name }}</h4>
        </el-card>
      </el-timeline-item>
    </el-timeline>
  </div>
</template>
<script>
export default {
  data() {
    return {
      logs: [],
    };
  },
  methods: {
    async getAllLogs() {
      var d = await this.$http.get("logs");
      this.logs = d.data;
    },
  },
  mounted: function () {
    this.getAllLogs();
  },
};
</script>
<style scoped>
</style>